package com.ushine.mybatisplus.permit.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ushine.mybatisplus.permit.mapper.PermitMapper;
import com.ushine.mybatisplus.permit.model.Permit;
import com.ushine.mybatisplus.permit.service.PermitService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collection;

@Service
@Transactional(transactionManager = "primaryTransactionManager")
public class PermitServiceImpl extends ServiceImpl<PermitMapper, Permit> implements PermitService {

    @Override
    @Transactional(transactionManager="primaryTransactionManager",rollbackFor = Exception.class)
    public boolean saveBatch(Collection<Permit> entityList) {
        return saveBatch(entityList,1000);
    }
}
